public class Solution1576 {
    public String modifyString(String s) {
        char[] c=s.toCharArray();
        for (int i=0;i<c.length;i++){
            if (c[i]=='?'){
                do{
                    int t=(int)(Math.random()*26);
                    c[i]= (char) (t+97);
                }while (i>=1 && c[i]==c[i-1] || i<c.length-1 && c[i]==c[i+1]);
            }
        }
        return String.valueOf(c);
    }

    public static void main(String[] args) {
        System.out.println(new Solution1576().modifyString("?zs"));
    }
}
